//#preprocess
package com.oc.claimobs.bb.ui;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FocusChangeListener;
import net.rim.device.api.ui.Screen;

public class TouchScreenButtonFocusChangeListener implements
		FocusChangeListener {

	private Screen screen = null;

	public TouchScreenButtonFocusChangeListener(Screen screen) {
		this.screen = screen;
	}

	public void focusChanged(Field field, int eventType) {

		if (eventType == FocusChangeListener.FOCUS_LOST) {
			{
				//#ifndef HAS_KEYBOARD
				/*
				//#endif
				if (VirtualKeyboard.isSupported()
						&& screen.getVirtualKeyboard() != null) {
					screen.getVirtualKeyboard().setVisibility(VirtualKeyboard.HIDE);
				}
				//#ifndef HAS_KEYBOARD
				*/
				//#endif
			}
		}

	}

}
